﻿using System.Threading;

namespace RIBA.Web
{
	public class TextRes
	{
		private static string _twoLetterISOLanguageName;

		public TextRes()
		{
			_twoLetterISOLanguageName = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName;
		}

		public static void SetLanguage(string twoLetterISOLanguageName)
		{
			_twoLetterISOLanguageName = twoLetterISOLanguageName;
		}

		public static string Cancel
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Abbrechen";
				if (_twoLetterISOLanguageName == "fr")
					return @"Annuler";
				
				return @"Cancel";
			}
		}

		public static string Canceled
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Abgebrochen";
				if (_twoLetterISOLanguageName == "fr")
					return @"Annulée";
				
				return @"Cancele";
			}
		}

		public static string OK
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"OK";
				if (_twoLetterISOLanguageName == "fr")
					return @"OK";
				
				return @"OK";
			}
		}

		public static string Required
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Mussfeld";
				if (_twoLetterISOLanguageName == "fr")
					return @"Nécessaire";
				
				return @"Required";
			}
		}

		public static string ErrorCaption
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Fehler";
				if (_twoLetterISOLanguageName == "fr")
					return @"Erreur";
				
				return @"Error";
			}
		}

		public static string ErrorText
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Bitte korrigieren Sie zuerst die markierten Fehler";
				if (_twoLetterISOLanguageName == "fr")
					return @"Correctez svp les erruers marquée";
				
				return @"Please correct first the marked errors";
			}
		}

		public static string Name
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Name";
				if (_twoLetterISOLanguageName == "fr")
					return @"Nom";
				
				return @"Name";
			}
		}

		public static string Password
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Passwort";
				if (_twoLetterISOLanguageName == "fr")
					return @"Mot de passe";
				
				return @"Password";
			}
		}

		public static string IsDirtyQuestion
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Sie haben Änderungen. Wollen Sie diese speichern?";
				if (_twoLetterISOLanguageName == "fr")
					return @"Voulez vous mémoriser vôtres changements?";
				
				return @"Do you want to save your changes?";
			}
		}

		public static string IsDirtyQuestionCaption
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Änderungen";
				if (_twoLetterISOLanguageName == "fr")
					return @"Changements";
				
				return @"Changes";
			}
		}

		public static string ContinueNavigationButtonCaption
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Nicht speichern";
				if (_twoLetterISOLanguageName == "fr")
					return @"Ne pas mémoriser";
				
				return @"Do not save";
			}
		}

		public static string CancelNavigationButtonCaption
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Zurück zum Speichern";
				if (_twoLetterISOLanguageName == "fr")
					return @"Retour pour mémoriser";
				
				return @"Back to save";
			}
		}

		public static string Timeout
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Zeit abgelaufen (Timeout)";
				if (_twoLetterISOLanguageName == "fr")
					return @"Timeout";
				
				return @"Timeout";
			}
		}

		public static string PleaseWait
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Bitte warten ...";
				if (_twoLetterISOLanguageName == "fr")
					return @"Attendez s'il vous plait ...";
				
				return @"Please wait ...";
			}
		}

		public static string DE
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"DE";
				if (_twoLetterISOLanguageName == "fr")
					return @"AL";
				
				return @"GE";
			}
		}

		public static string EN
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"EN";
				if (_twoLetterISOLanguageName == "fr")
					return @"EN";
				
				return @"EN";
			}
		}

		public static string FR
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"FR";
				if (_twoLetterISOLanguageName == "fr")
					return @"FR";
				
				return @"FR";
			}
		}

		public static string Authors
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Autoren";
				if (_twoLetterISOLanguageName == "fr")
					return @"Autors";
				
				return @"Authors";
			}
		}

		public static string Books
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Bücher";
				if (_twoLetterISOLanguageName == "fr")
					return @"Livres";
				
				return @"Books";
			}
		}

		public static string QueryServerTime
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Serverzeit abfragen";
				if (_twoLetterISOLanguageName == "fr")
					return @"Extraire temps du serveur";
				
				return @"Query server time";
			}
		}

		public static string GetLongAnswer
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Lange Antwort abfragen";
				if (_twoLetterISOLanguageName == "fr")
					return @"Eytraire réponse longe";
				
				return @"Get long answer";
			}
		}

		public static string AdminOnly
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Nur Admin";
				if (_twoLetterISOLanguageName == "fr")
					return @"Seulement Admin";
				
				return @"Admin only";
			}
		}

		public static string ServerTime
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Serverzeit";
				if (_twoLetterISOLanguageName == "fr")
					return @"Temps du serveur";
				
				return @"Server time";
			}
		}

		public static string ServerTimeTimeout
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Serverzeit (SendTimeout=10s)";
				if (_twoLetterISOLanguageName == "fr")
					return @"Temps du serveur (SendTimeout=10s)";
				
				return @"Server time (SendTimeout=10s)";
			}
		}

		public static string ToLongAnswer
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Zu lange Antwort";
				if (_twoLetterISOLanguageName == "fr")
					return @"Réponse trop longe";
				
				return @"To long answer";
			}
		}

		public static string ExternalAssemblyLoaded
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Externes Assembly Admin.dll geladen";
				if (_twoLetterISOLanguageName == "fr")
					return @"Assembly externe (Admin.dll) chargée";
				
				return @"External assembly admin.dll loaded";
			}
		}

		public static string Login
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Anmelden (Forms.Timeout=60s)";
				if (_twoLetterISOLanguageName == "fr")
					return @"Se connecter (Forms.Timeout=60s)";
				
				return @"Login (Forms.Timeout=60s)";
			}
		}

		public static string Logout
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Abmelden";
				if (_twoLetterISOLanguageName == "fr")
					return @"Se déconnecter";
				
				return @"Logout";
			}
		}

		public static string LoginCanceled
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Anmeldung abgebrochen";
				if (_twoLetterISOLanguageName == "fr")
					return @"Connecter cassée";
				
				return @"Login canceled";
			}
		}

		public static string UserOrPasswordWrong
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Benutzer oder Passwort falsch";
				if (_twoLetterISOLanguageName == "fr")
					return @"Client ou mot de passe faux";
				
				return @"User or Password wrong";
			}
		}

		public static string RequiresAuthentication
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Anmeldung nötig";
				if (_twoLetterISOLanguageName == "fr")
					return @"Besoin de se connecter";
				
				return @"Requires Authentication";
			}
		}

		public static string NoAccessRight
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Keine Berechtigung";
				if (_twoLetterISOLanguageName == "fr")
					return @"Pas d'authorisation";
				
				return @"No access right";
			}
		}

		public static string MaxReceivedMessageSize
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Zu lange Antwort (MaxReceivedMessageSize)";
				if (_twoLetterISOLanguageName == "fr")
					return @"Réponse trop longe (MaxReceivedMessageSize)";
				
				return @"To long answer (MaxReceivedMessageSize)";
			}
		}

		public static string TestUser
		{
			get
			{
				if (_twoLetterISOLanguageName == "de")
					return @"Name=test, Passwort=pass, Rolle=admin\nName=test1, Passwort=pass, Rolle=browse";
				if (_twoLetterISOLanguageName == "fr")
					return @"Nom=test, mot de passe=pass, rôle=admin\nNom=test1, mot de passe=pass, rôle=browse";
				
				return @"Name=test, password=pass, role=admin\nName=test1, password=pass, role=browse";
			}
		}

			}
}